import type { UserInfo } from '@vben/types';

import { requestClient } from '#/api/request';

export namespace AuthApi {
  export interface GetRouters {
    msg: string;
    code: number;
    data: [];
  }
}

/**
 * 获取用户信息
 */
export async function getUserInfoApi() {
  return requestClient.get<UserInfo>('/getInfo');
}

/**
 * 获取路由
 */
export async function getRouters() {
  return requestClient.get<AuthApi.GetRouters>('/getRouters');
}
